import { useStore } from '@/store'

export default function LoginForm() {
  const { login } = useStore((s) => ({ login: s.login }))
  
  const handleLogin = () => {
    login('user')
  }
  
  return (
    <div className="space-y-4">
      <button 
        onClick={handleLogin}
        className="w-full px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600 transition-colors"
      >
        模拟登录
      </button>
      
      <div className="text-center text-sm text-gray-500">
        点击按钮模拟登录，登录后角色为 "user"
      </div>
    </div>
  )
} 